#include "AttributeXML.h"

using namespace std;

AttributeXML::AttributeXML(string _name, string _value){
	name = _name;
	value = _value;
}


AttributeXML::AttributeXML(char* _name, char* _value){
	name = string(_name);
	value = string(_value);
}

string AttributeXML::toString() const {
    string ch=" ";
    if(!name.empty())
    	ch = ch + name +"=\""+value+"\"";
   return ch;
  
}
string AttributeXML::getName() const {
	return name;
}
string AttributeXML::getValue() const {
	return value;
}
bool AttributeXML::setName(string _name){
	if(!_name.empty()){
		name = _name;
		return true;
	}
	else return false;
}
bool AttributeXML::setValue(string _value){
	if(!_value.empty()){
		value = _value;
		return true;
	}
	else return false;
}
